console.log('The Object.create() method creates a new object with the specified prototype object and properties.');
console.warn('proto paramete must be null or object')

var o;

//create an object with null as prototype
o = Object.create(null);

// is equivalent to:
o = Object.create(Object.prototype);

o = Object.create({}, { p: { value: 42 } });

//by default properties ARE NOT writable, enumerable or configurable:
o.p = 24;
o.p; // 42

o.newKey = 12;
for (var prop in o) {
  console.log(prop); // 'newKey'
}

delete o.p; // false

console.log('o:');
console.log(o)
console.log('o.p:')
console.log(o.p)
console.log('o.p isSealed: ' + Object.isSealed(o.p));

// to specify an ES3 property
o2 = Object.create({}, {
  p: {
    value: 'value from o2',
    writable: true,
    enumerable: true,
    configurable: true
  }
});
console.log(o2)

console.log('------注意:')
console.log('复制这句话:o = Object.create({}, { p: { value: 42 } });');
console.log('Chrome DevTools 的Console看到的结果与node REPL结果不一样, Chrome能到不可枚举的属性');

